#include "threadpool.hpp"
#include "task.hpp"

int main()
{
    srand(time(nullptr));
    threadpool<task> tpool;
    tpool.run();
    while (true)
    {
        int a = rand() % 100;
        int b = rand() % 100;
        char op = operation[rand() % 4];
        task _task(a, b, op);
        std::cout << pthread_self() << "分配任务:" << _task.msg << std::endl;
        tpool.push(_task);
        sleep(1);
    }
    return 0;
}